@import './base.css';

/* 全局响应式设计 */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

#app {
  height: 100%;
  min-height: 100vh;
}

/* 响应式字体大小 */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 12px;
  }
}

/* 当F12开发者工具打开时的特殊处理 */
@media (max-height: 600px) {
  body {
    min-height: auto;
  }

  #app {
    min-height: auto;
  }
}

/* 确保Element Plus组件在小屏幕上也能正常显示 */
@media (max-width: 768px) {
  .el-form-item {
    margin-bottom: 15px;
  }

  .el-button {
    font-size: 14px;
  }

  .el-input {
    font-size: 14px;
  }

  .el-table {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .el-form-item {
    margin-bottom: 12px;
  }

  .el-button {
    font-size: 12px;
  }

  .el-input {
    font-size: 12px;
  }

  .el-table {
    font-size: 11px;
  }
}

/* 滚动条样式优化 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 确保在F12开发者工具打开时内容不会被遮挡 */
@media (max-height: 600px) {
  .el-main {
    padding: 10px !important;
  }

  .el-card {
    margin-bottom: 10px;
  }

  .el-table {
    margin-bottom: 10px;
  }
}

a,
.green {
  text-decoration: none;
  color: hsla(160, 100%, 37%, 1);
  transition: 0.4s;
  padding: 3px;
}

@media (hover: hover) {
  a:hover {
    background-color: hsla(160, 100%, 37%, 0.2);
  }
}

@media (min-width: 1024px) {
  body {
    display: flex;
    place-items: center;
  }

  #app {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0 2rem;
  }
}